﻿

<CnGalWebSite.Components.Containers.MasaTitleContainer Icon="@IconType.Infor.ToIconString()" Title="附加信息" Class="@Class" Collapable Outline>
    <MDCard Class="@($"pa-3 {Class}")">
        <div>
            <MRow>
                @switch (Model.Type)
                {
                    case EntryType.Game:
                        <MCol Cols="12" Md="6">
                            <MTextField @bind-Value="Model.ProductionGroup" Label="制作组" />
                        </MCol>
                        <MCol Cols="12" Md="6">
                            <MTextField @bind-Value="Model.Publisher" Label="发行商" />
                        </MCol>
                        break;
                    case EntryType.Role:
                        <MCol Cols="12" Md="6">
                            <MTextField @bind-Value="Model.CV" Label="声优" />
                        </MCol>
                        break;
                }

                <CnGalWebSite.Shared.MasaComponent.Shared.Editors.Cards.EditInformationsCard Informations="Model.Informations" />
            </MRow>

            @if (Model.Type == EntryType.Game)
            {
                <SectionTitleCard Title="发行列表" Text="游戏的各个发行版本" />
                <CnGalWebSite.Shared.MasaComponent.Shared.Editors.Cards.GameReleases.MainCard Model="Model.Releases" />
                <AuthorizeView Roles="Admin">
                    <Authorized>
                        <SectionTitleCard Title="预约" Text="发布前的预约活动" />
                        <CnGalWebSite.Shared.MasaComponent.Shared.Editors.Cards.BookingCard Model="Model.Booking" LotteryItems="LotteryItems" />
                    </Authorized>
                </AuthorizeView>
            }

</div>
       
    </MDCard>

    @if (Model.Type == EntryType.Game)
{
    <div class="@Class">
        <CnGalWebSite.Shared.MasaComponent.Shared.Editors.Cards.Staffs.StaffEditorChartListTip Staffs="Model.Staffs" />
    </div>
}
</CnGalWebSite.Components.Containers.MasaTitleContainer>

@code {
    [Parameter]
    public EditAddInforViewModel Model { get; set; }
    [Parameter]
    public string Class { get; set; }
    [Parameter]
    public List<string> EntryGroupItems { get; set; }
    [Parameter]
    public List<string> EntryStaffItems { get; set; }
    [Parameter]
    public List<string> LotteryItems { get; set; }
}
